#ifndef VIEWDOCUMENTSLISTMODEL_H
#define VIEWDOCUMENTSLISTMODEL_H

#include <QAbstractListModel>
class Document;

class ViewDocumentsListModel : public QAbstractListModel
{
    Q_OBJECT
public:
    explicit ViewDocumentsListModel(QObject *parent = 0);
    
    Qt::ItemFlags flags(const QModelIndex & index) const;
    int rowCount(const QModelIndex &parent = QModelIndex()) const ;
    int columnCount(const QModelIndex &parent = QModelIndex()) const;

    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;

    void addDocument(QPointer<Document> doc);
    void removeDocument(QPointer<Document> doc);

    int docIndexInModel(QPointer<Document> doc);
private:
    QList<QPointer<Document> > m_docs;
signals:
    
public slots:
    
};

#endif // VIEWDOCUMENTSLISTMODEL_H
